# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# Author: g0tsu
# Email:  g0tsu at dnmx.0rg

AC_INIT([libhighlight], [0.0.2], [bug-automake@gnu.org])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
AC_PROG_CC
AM_PROG_AR
AC_CHECK_HEADERS([stdint.h stdlib.h string.h unistd.h])

AC_CONFIG_MACRO_DIRS([m4])

#CFLAGS="-fsanitize=address -ggdb -Wall"
AC_ARG_ENABLE([html],
                  AS_HELP_STRING([--enable-html], [enable html support]))

AS_IF([test "x$enable_html" = "xyes"], [
  AC_DEFINE(CONFIG_USE_HTML, 1, [enable html support])
])

AC_CHECK_HEADERS([stdlib.h])
AC_CONFIG_HEADERS([config.h])

AC_CONFIG_FILES([
                  Makefile
                  src/Makefile
                  test/Makefile
                  highlight/Makefile
                   ])
LT_INIT
AC_OUTPUT
